//
//  SunTriangle.m
//  Xspcf
//
//  Created by sunshine on 16/10/27.
//  Copyright © 2016年 小小算盘. All rights reserved.
//

#import "SunTriangle.h"

@implementation SunTriangle

- (void)drawRect:(CGRect)rect {
    CGSize size = self.bounds.size;
    [[UIColor whiteColor] set];
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextBeginPath(context);
    CGContextMoveToPoint(context,0, size.height / 2);
    CGContextAddLineToPoint(context,size.width, 0);
    CGContextAddLineToPoint(context,0, 0);
    CGContextAddLineToPoint(context,0, size.height);
    CGContextAddLineToPoint(context,size.width, size.height);
    CGContextClosePath(context);
    [BACKGROUND setFill];
    [BACKGROUND setStroke];
    CGContextDrawPath(context,kCGPathFillStroke);
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
